package com.windo.helloBubble.objects;

public class Bubble {
	//variables
	static int box_width;
	static int box_height;
	  
	public float centerX;
	public float centerY;
	public float speedX;
	public float speedY;
	public float bubbleR;
	public String ballName;
	
	public String textOnBubble = "";
	
	//constructor
	public Bubble(float centerX, float centerY, float speedLimit, float bubbleR, String ballName){
		//setup all the variables
		this.centerX = centerX;
		this.centerY = centerY;
		this.speedX = Math.round(Math.abs(Math.random()* speedLimit));
		this.speedY = Math.round(Math.abs(Math.random()* speedLimit));
		this.bubbleR = bubbleR;
		this.ballName = ballName;
	}
	public void setSpeed(float speedX, float speedY){
		this.speedX = speedX;
		this.speedY = speedY;
	}
	public void moveBallPosition(){
		centerX += speedX;
		centerY += speedY;
	}
	
	public void flipX(){
		speedX = (-1)*speedX;
	}
	
	public void flipY(){
		speedY = (-1)*speedY;
	}
}
